home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PASANS.ZIP / CH10_1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  638b  |  31 lines

  1.                            (* Chapter 10 - Programming exercise 1 *)
  2. program Simple_WP;
  3.  
  4. var In_Line : string[60];
  5.     Index   : integer;
  6.     c       : char;
  7.  
  8. begin
  9.    repeat
  10.       In_Line := '';
  11.       Index := 0;
  12.       repeat
  13.          Index := Index + 1;
  14.          Read(c);
  15.          In_Line := In_Line + c;
  16.       until (Index = 60) or (In_Line[Index] = Chr(10));
  17.       Writeln(In_Line);
  18.    until (In_Line[1] = 'E') and
  19.                      (In_Line[2] = 'N') and
  20.                                  (In_Line[3] = 'D');
  21. end.
  22.  
  23.  
  24.  
  25.  
  26. { Result of execution
  27.  
  28. (The input is echoed line by line until END is entered.)
  29.  
  30. }
  31.